import Layout from '@/layout'

export default {
  path: '/news',
  component: Layout,
  redirect: '/news/list',
  name: 'News',
  meta: { title: '新闻资讯', icon: 'message', noCache: true, roles: ['news'] },
  children: [
    {
      path: 'create',
      name: 'NewsCreate',
      component: () => import('@/views/news/create'),
      meta: { title: '添加新闻', icon: 'star', noCache: true }
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/news/edit'),
      meta: { title: '编辑新闻', noCache: true },
      hidden: true
    },
    {
      path: 'list',
      name: 'NewsList',
      component: () => import('@/views/news/list'),
      meta: { title: '新闻列表', icon: 'star', noCache: true }
    }
  ]
}
